package kz.pompei.ifacer.grot.acts;

import kz.pompei.ifacer.model.widgets.Widget;

public class AddAct extends Act {
  private final Widget widget;
  
  public AddAct(Widget widget) {
    this.widget = widget;
  }
  
  @Override
  public void apply(GrotStorage grotStorage) {
    grotStorage.append(widget);
  }
  
  @Override
  public void cancel(GrotStorage grotStorage) {
    grotStorage.removeLast();
  }
}
